import request from '../../../utils/request'

//
export function groupByType(type) {
  return request({
    url: `/cockpitapi/patrol/groupByType?type=${type}`,
    method: 'post'
  })
}

// 按月份统计观测数
export function groupByMonth(year) {
  return request({
    url: `/cockpitapi/patrol/groupByMonth?year=${year}`,
    method: 'post'
  })
}

// 按物候结果统计
export function groupByKSZ(startTime, endTime) {
  return request({
    url: `/cockpitapi/patrol/groupByKSZ?startTime=${startTime}&endTime=${endTime}`,
    method: 'post'
  })
}

// 按物候期统计
export function groupByTagAndMonth(params) {
  return request({
    url: `/cockpitapi/patrol/groupByTagAndMonth`,
    method: 'post',
    data:params
  })
}

// 查询
export function groupByTag(tag,plant_name) {
  return request({
    url: `/cockpitapi/patrol/groupByTag?tag=${tag}&plant_name=${plant_name}`,
    method: 'post'
  })
}

// 查询
export function getParolByRegistration(introduction_registration_number) {
  return request({
    url: `/cockpitapi/patrol/getParolByRegistration?introduction_registration_number=${introduction_registration_number}`,
    method: 'post'
  })
}


